package com.kgame5.xtank3d.model.ground {
import kgame5.enginex.Entity;
import kgame5.enginex.comp.IRender;
import kgame5.k3d.core.obj3d.node3d.Node3D;

import com.kgame5.xtank3d.vo.GroundVO;

/**
 * @author kk
 */
public class GroundEntity extends Entity implements IRender{
	
	private var vo:GroundVO;
	
	public function GroundEntity(p_vo:GroundVO){
		super(p_vo);
		vo=p_vo;
		comp=new GroundViewComp(vo);
		
		//3D里是地面中心对齐世界且屁股朝Y的模型，为了我能用而这样转换一下。转换后我的模型是左上角为世界中心
		comp.move(vo.Width/2, 0, -vo.Height/2);
	}
	
	//---------------view-----------------
	//简单情况不需要使用viewComp
	private var comp:GroundViewComp;
	public function updateView():void{
		//空
	}
	public function getNode3D():Node3D{
		return comp.getNode3D();
	}
	public function getShadow3D():Node3D{
		return comp.getShadow3D();
	}
}
}
